package com.information.manage.basic.audit.model.query;

import com.information.manage.basic.audit.constant.AuditTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.util.List;

@Data
@ApiModel("添加审核模板")
public class AddAuditModelQuery {

    /**
     * 审核模板名称
     */
    @NotBlank(message = "审核模板名称不能为空")
    @Size(max = 30 , message = "审核模板名称最多30个字符")
    @ApiModelProperty(name = "审核模板名称")
    private String name;

    /**
     * @see com.information.manage.basic.audit.constant.AuditTypeEnum
     */
    @ApiModelProperty(name = "审核类型")
    private String type = AuditTypeEnum.OTHER.name();

    /**
     * 自动去重：0/no 1/yes
     */
    @ApiModelProperty(name = "自动去重：0/no 1/yes")
    private Integer duplicateRemoval = 1;

    /**
     * 自动通过：0/no 1/yes
     */
    @ApiModelProperty(name = "自动通过：0/no 1/yes")
    private Integer autoPass = 1;

    @NotEmpty(message = "审核层级不能为空")
    @ApiModelProperty(name = "审核层级")
    private List<AddAuditLevelQuery> addAuditLevelQueryList;
}
